package com.shy.configs.converts;


import com.shy.collect.entity.PayWay;
import com.shy.configs.mvc.models.vo.PayWayVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.MappingConstants;
import org.mapstruct.Mappings;

import java.util.List;

@Mapper(componentModel = MappingConstants.ComponentModel.SPRING, uses = {ConvertHelper.class})
public interface PayWayConvert {

    List<PayWayVo> convertListPayWayVo(List<PayWay> payWayList);

    @Mappings({
            @Mapping(source = "editTime", target = "editTime", dateFormat = "yyyy-MM-dd HH:mm:ss"),
            @Mapping(source = "status", target = "status", qualifiedByName = "transStatus"),
            @Mapping(source = "payProductCode", target = "productCode")

    })
    PayWayVo mapPayWayVo(PayWay payWay);
}
